package com.yourcompany.api.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.yourcompany.common.utils.CustomBooleanDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@Schema(description = "菜单DTO")
public class MenuDTO {

    @Schema(description = "父级菜单ID，0表示顶级菜单")
    private Long parentId = 0L;

    @NotBlank(message = "菜单名称不能为空")
    @Schema(description = "菜单名称")
    private String name;

    @NotBlank(message = "菜单标识不能为空")
    @Schema(description = "菜单标识")
    private String code;

    @Schema(description = "菜单路径")
    private String path;

    @Schema(description = "前端组件路径")
    private String component;

    @Schema(description = "菜单图标")
    private String icon;

    @Schema(description = "排序值")
    private Integer sort = 0;

    @NotNull(message = "状态不能为空")
    @JsonDeserialize(using = CustomBooleanDeserializer.class)
    @Schema(description = "状态：0-禁用 1-启用")
    private Boolean status = true;

    @NotNull(message = "是否显示不能为空")
    @Schema(description = "是否显示：0-否 1-是")
    @JsonDeserialize(using = CustomBooleanDeserializer.class)
    private Boolean isVisible = true;

    @Schema(description = "创建人ID")
    private Long creatorId;
} 